package api.app;

import java.io.IOException;

import org.json.JSONException;
import org.json.JSONObject;

import common.Host;
import common.Request;

/**
 * 实现帮忙医APP短信验证码校验接口VerificationPhoneCode调用
 * @author MaoJJ
 *
 */
public class VerificationPhoneCode
{
	/**
	 * 实现帮忙医APP短信验证码校验接口VerificationPhoneCode调用
	 * @param mobile - 手机号
	 * @param code - 验证码
	 * @return 接口返回数据
	 * @throws JSONException
	 * @throws IOException
	 */
	public static String post(String mobile, String code) throws JSONException, IOException
	{
		//拼接接口地址
		String url = Host.getAddress() + "/APIAccount/VerificationPhoneCode";
				
		//给接口参数赋值
		JSONObject parms = new JSONObject();
		parms.put("Mobilephone", mobile);
		parms.put("code", code);

		//调用接口并返回接口结果
		String result = Request.post(url, parms);
		return result;	
	}

}
